package cn.net.ecode.modules.sys.entity;

import cn.net.ecode.common.persistence.DataEntity;

/**
 * 用户数据范围
 * @version 2014-8-19
 */
public class UserDataScope extends DataEntity<UserDataScope>{

	private static final long serialVersionUID = 1L;
	private String userCode;
	private String ctrlType;
	private String ctrlData;
	
	private String manageDataScope; // 如果是二级管理员，则是  _m

	public UserDataScope() {
		super();
	}

	public UserDataScope(User user){
		this();
		this.userCode = user.getUserCode();
	}
	
	public UserDataScope(User user, String ctrlType){
		this(user);
		this.ctrlType = ctrlType;
	}
	
	public String getUserCode() {
		return userCode;
	}
	
	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}
	
	public String getCtrlType() {
		return ctrlType;
	}
	
	public void setCtrlType(String ctrlType) {
		this.ctrlType = ctrlType;
	}
	
	public String getCtrlData() {
		return ctrlData;
	}
	
	public void setCtrlData(String ctrlData) {
		this.ctrlData = ctrlData;
	}
	
	public String getManageDataScope() {
		return manageDataScope;
	}

	public void setManageDataScope(String manageDataScope) {
		this.manageDataScope = manageDataScope;
	}
	
	/**
	 * 控制类型：公司
	 */
	public static final String CTRL_TYPE_COMPANY = "SYS_COMPANY";
	
	/**
	 * 控制类型：组织机构
	 */
	public static final String CTRL_TYPE_OFFICE = "SYS_OFFICE";

}
